package edu.sctu.zhoudie.mouth201505.day20150524.TextThree;

import java.util.List;

/**
 * Created by user08 on 2015/5/24.
 */
public class Printer {
    public void printting(List list) {
        Student[] student = new Student[list.size() - 1];
        String courseName = (String) list.get(0);

        for (int i = 1; i < list.size(); i++) {
            student[i - 1] = (Student) list.get(i);
        }

        System.out.println("最多学生学习的课是 ：" + courseName);
        System.out.println("学习人数是 ：" + student.length);
        System.out.println("学习的人是:  ");
        for (int i = 0; i < student.length; i++) {
            System.out.print(student[i].name + "   ");
        }

    }
}
